package com.gameapplet.challenge.service.Impl;

import com.gameapplet.challenge.dao.IChallengeStatusDao;
import com.gameapplet.challenge.model.ChallengeStatus;
import com.gameapplet.challenge.service.IChallengeStatusService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("challengeStatusService")
public class ChallengeStatusServiceImpl implements IChallengeStatusService {
    @Resource(name = "challengeStatusDao")
    IChallengeStatusDao challengeStatusDao;

    @Override
    public void addChallengeStatus(ChallengeStatus status) {
        challengeStatusDao.addChallengeStatus(status);
    }

    @Override
    public int selectNumByOpenid(String openid) {
        return challengeStatusDao.selectNumByOpenid(openid);
    }

    @Override
    public List<ChallengeStatus> selectChallengStatusByChallengeid(String challengeid) {
        return challengeStatusDao.selectChallengStatusByChallengeid(challengeid);
    }
}
